package org.h2.index;

import java.util.Iterator;
import org.h2.engine.Session;
import org.h2.message.DbException;
import org.h2.result.Row;
import org.h2.result.RowList;
import org.h2.result.SearchRow;

public class MultiIndexCursor implements Cursor {
	private RowList _rows;
	private Row _row;
	
    MultiIndexCursor(RowList rows) {
		_rows = rows;
        _row = null;
    }

    public Row get() {
        return _row;
    }

    public SearchRow getSearchRow() {
        return _row;
    }

    public boolean next() {
		if (_rows.hasNext()) {
			_row = _rows.next();
		} else {
			_row = null;
		}
        return _row != null;
    }

    public boolean previous() {
        throw DbException.throwInternalError();
    }

}